home *** CD-ROM | disk | FTP | other *** search
- Path: newsbf02.news.aol.com!not-for-mail
- From: ericburke@aol.com (Eric Burke)
- Newsgroups: comp.lang.c++
- Subject: Re: Q: Any reason not to dump C in favour of C++ ?
- Date: 10 Feb 1996 21:17:25 -0500
- Organization: America Online, Inc. (1-800-827-6364)
- Sender: root@newsbf02.news.aol.com
- Message-ID: <4fjjjl$mer@newsbf02.news.aol.com>
- References: <4fgiht$gh5@gidora.kralizec.net.au>
- NNTP-Posting-Host: newsbf02.mail.aol.com
- X-Newsreader: AOL Offline Reader
-
- In article <4fgiht$gh5@gidora.kralizec.net.au>, rosko@zeta.org.au (Ross
- McKay) writes:
-
- >The question is because we want to revamp our in-house code libraries
- >with more new classes / types, and I would prefer to keep it all in
- >C++ so that any structures are proper objects, not just structs with
- >associated functions.
- >
- >Can anyone give me a good reason why not to convert our C-only structs
- >to C++ (i.e. given that we have C++, and currently only code in C++,
- >will we ever find a need to use C over C++) ?
- >
- >
-
- A good reason not to switch...your existing code (presumably) works, and
- you run the risk of breaking it if you change it.
-
- Have you considered writing C++ classes which form a "facade" to your
- C structs and functions, which are safely hidden from the rest of the
- application? This will allow you to provide a more OO public interface,
- while preserving your legacy C code behind the scenes. If the C functions
-
- and structs are hidden behind this interface, you can gradually replace
- the
- C library over time.
-
-
- Eric Burke
- ericburke@aol.com
-